package tk.mybatis.springboot.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import tk.mybatis.springboot.mapper.Provider.OrderProvider;
import tk.mybatis.springboot.model.TOrder;
import tk.mybatis.springboot.model.TOrderExtend;
import tk.mybatis.springboot.share.MyMapper;

public interface OrderMapper extends MyMapper<TOrder>{
	public List<TOrderExtend> getOrders(@Param("userId")String userId);
	
	@SelectProvider(type=OrderProvider.class,method="findOrderList")
	public List<TOrderExtend> findOrderList(@Param("orderNo") String orderNo, @Param("phone") String phone,
			 @Param("createDateBegin") Date createDateBegin, @Param("createDateEnd") Date createDateEnd, @Param("address") String address);
	
	@SelectProvider(type=OrderProvider.class,method="findOrderCount")
	public Integer findOrderCount(@Param("orderNo") String orderNo, @Param("phone") String phone,
			 @Param("createDateBegin") Date createDateBegin, @Param("createDateEnd") Date createDateEnd, @Param("address") String address);
}
